package com.nhjf.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;


/**
 * 领域模型基础类，需要id的聚合根和实体继承此类
 * @author yuxx
 *
 */
@MappedSuperclass
public class BaseModel implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	// ---------------------<Hibernate自动创建表用>---------------------

	public static final String MONEY_COLUM = "NUMBER(24,4)";
	public static final String GOLD_WEIGHT_COLUM = "NUMBER(16,4)";
	public static final String DATE_COLUM = "DATE";
	public static final String TYPE_NUM_COLUM = "NUMBER(5)";
	public static final String NUM_COLUM = "NUMBER(14)";
	public static final String DOUBLE_COLUM = "NUMBER";
	public static final String CHAR_COLUM = "CHAR(1)";
	public static final String TEXT_COLUM = "CLOB";
	public static final String NUM_LONG_COLUM = "NUMBER(20)";
	
	// ---------------------<Hibernate自动创建表用>---------------------

//	/**
//	 * 主键
//	 */
//	@Id
//	@GeneratedValue(generator = "generator")
//	@GenericGenerator(name = "generator", strategy = "native")
//	@Column(name = "ID", unique = true, length = 64)
//	private String id;
//	
//	public String getId() {
//		return id;
//	}
//
//	public void setId(String id) {
//		this.id = id;
//	}
}
